
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<script src="${ctx}/resources/plugin/ajaxFileupload/jquery.form.js"></script>
<script type="text/javascript">
	function goImage(obj) {
		var url = obj.src;
		console.log("url的值为" + url);
		window.open(url);
	}
	function registerApplyHandle(flag){
		if(flag==1){
			if($("#handleOpinion").val()=='' || $("#handleOpinion").val()==null){
				$(this).alertmsg('info', '不同意请填写处理意见', {displayMode:'slide', displayPosition:'topcenter', okName:'确定', title:'提示'})
				return false;
			}
		}
		$("#handleResult").val(flag);
		$("#merchantForm").submit();
	}
</script>
<div class="bjui-pageContent" style="background: #FFF;">
	<form id="merchantForm" action="${ctx}/bus/merchant/checkSave"
		class="ajaxForm" data-toggle="validate" enctype="multipart/form-data">
		<input type="hidden" name="id" id="id" value="${dataResult.id }">
		<input type="hidden" name="status" id="status" value="${dataResult.status}"> 
		<input type="hidden" name="handleResult" id="handleResult" > 
		<table class="table table-condensed table-hover">
			<tbody>
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">商户名称：</label>
						<input class="" id="merchantName" type="text" name="merchantName"
						readonly value="${dataResult.merchantName}" data-rule="required;" /></td>
					<td><label for="name" class="control-label x90">联系电话：</label>
						<input class="" id="name" type="text" name="phone"  readonly
						value="${dataResult.phone}" data-rule="required;" /></td>
				</tr>
		
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">企业名称：</label>
						<input class="" id="enterpriseName" type="text" name="enterpriseName" readonly
						value="${dataResult.enterpriseName}" data-rule="required;" /></td>
					<td><label for="name" class="control-label x90">信用代码：</label>
						<input class="" id="country" type="text" name="creditCode" readonly
						value="${dataResult.creditCode}" data-rule="required;" /></td>
				</tr>
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">企业邮箱：</label>
						<input class="" id="creditEmail" type="text" name="creditEmail" readonly
						value="${dataResult.creditEmail}" data-rule="required;" /></td>
					<td><label for="name" class="control-label x90">注册号：</label>
						<input class="" id="registerNum" type="text" name="registerNum" readonly
						value="${dataResult.registerNum}" data-rule="required;" /></td>
				</tr>
				<tr style="height: 40px;">
					<td colspan="3"><label for="name" class="control-label x90">营业执照：</label>
						<img width="50px" name="imgUrl" id="imgUrl" src="${ctx }/${dataResult.businessLicensePhoto}" onclick="goImage(this)" /></td>
				</tr>
				
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">法人姓名：</label>
						<input class="" id="legalName" type="text" name="legalName" readonly
						value="${dataResult.legalName}" data-rule="required;" /></td>
					<td><label for="name" class="control-label x90">法人联系电话：</label>
						<input class="" id="legalPhone" type="text" name="legalPhone" readonly
						value="${dataResult.legalPhone}" data-rule="required;" /></td>
				</tr>
				<tr style="height: 40px;">
					<td colspan="3"><label for="name" class="control-label x90">法人身份证照片：</label>
						<img width="50px" name="imgUrl" id="imgUrl" src="${ctx }/${dataResult.legalIdFacePhoto}" onclick="goImage(this)" />
						<img width="50px" name="imgUrl" id="imgUrl" src="${ctx }/${dataResult.legalBackPhoto}" onclick="goImage(this)" />
					</td>
				</tr>
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">注册日期：</label>
						<input class="" id="registerTime" type="text" name="registerTime" readonly
						value="<fmt:formatDate value='${dataResult.registerTime}' pattern="yyyy-MM-dd HH:mm:ss"/>" data-rule="required;" />
					</td>
					<td><label for="name" class="control-label x90">提现手续费（%）：</label>
						<input class="" id="cashPoundage" type="text" name="cashPoundage"
						value="${dataResult.cashPoundage}" data-rule="required;" />
					</td>
				</tr>
				<tr style="height: 20px;">
					<td colspan="3"><label for="name" class="control-label x90">经营范围：</label>
						<textarea cols="62" rows="4" readonly >${dataResult.manageScope}</textarea>
					</td>
				</tr>
				<tr style="height: 30px;">
					<td colspan="3"><label for="name" class="control-label x90">备注信息：</label>
						<textarea name="remark" id="remark"  rows="5" cols="62">${dataResult.remark}</textarea>
					</td>
				</tr>
					<tr style="height: 30px;">
					<td colspan="3"><label for="name" class="control-label x90">处理意见：</label>
						<textarea name="handleOpinion" id="handleOpinion"  rows="5" cols="62"></textarea>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
	<div style="text-align:center">
		<button class="btn-default" style="margin:10px 5px 15px 20px;" onclick="registerApplyHandle(0)" type="button" class="btn-default" data-icon="save">同意 </button>  
		<button class="btn-default"  style="margin:10px 5px 15px 20px;" onclick="registerApplyHandle(1)">不同意</button>
	</div>
</div>
<div class="bjui-pageFooter">
	<ul>
		<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		<c:if test="${flag=='edit' }">
			<li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
		</c:if>
	</ul>
</div>